using System;
using System.Drawing;
using System.IO;
using System.Web;
using System.Windows.Forms;

using OR.Reuse.Persistence;

using OR.Lazarus.Business;

namespace OR.Lazarus.Windows
{
	/// <summary>
	/// Summary description for Class1.
	/// </summary>
	public class CompilerLogViewer : RichTextBox, OR.Lazarus.Business.ILogViewer
	{
		private Color	m_clrCompilerStateColor;
		private Color	m_clrGenerationColor;
		private Color	m_clrErrorColor;

		public CompilerLogViewer()
		{
			// Replace with file loading.
			m_clrCompilerStateColor	= Color.Navy;
			m_clrGenerationColor		= Color.Black;
			m_clrErrorColor			= Color.Red;

			this.ReadOnly = true;
		}

		public void AddLineBreak()
		{
			this.SelectedText = "\n";
		}

		public void AddMessage( Color pColor, string pMessage )
		{
			this.SelectionColor = pColor;

			this.SelectedText = pMessage + "\n";

			this.ScrollToCaret();
		}
	}
}
